package edu.gatech.cs2340.bytebankers.model;

import java.io.Serializable;
import java.util.LinkedList;

public class Trail implements Serializable {
	private LinkedList<Location> locationList;
	private Location Independence, KansasRiver, BigBlue, FtKearny, ChimeyRock,
		FtLaramie, IndependenceRock, SouthPass, FtBridger, SodaSprings, FtHall,
		SnakeRiver, FtBoise, BlueMountain, FtWalla, Dalles; 
	
	/**
	 * 
	 */
	public Trail(){
		locationList = new LinkedList<Location>();
		generateTrailLocations();
		locationList.add(Independence);
		locationList.add(KansasRiver);
		locationList.add(BigBlue);
		locationList.add(FtKearny);
		locationList.add(ChimeyRock);
		locationList.add(FtLaramie);
		locationList.add(IndependenceRock);
		locationList.add(SouthPass);
		locationList.add(FtBridger);
		locationList.add(SodaSprings);
		locationList.add(FtHall);
		locationList.add(SnakeRiver); 
		locationList.add(FtBoise);
		locationList.add(BlueMountain);
		locationList.add(FtWalla);
		locationList.add(Dalles); 
		
	}
	
	private void generateTrailLocations(){
		
		Dalles = new Location("Dalles", null, 0, 66, 235, false);
		FtWalla = new Location("Ft. Walla", Dalles, 120, 107, 226, true);
		BlueMountain = new Location("Blue Mountains", FtWalla, 55, 119, 210, false);
		FtBoise = new Location("Ft. Boise", BlueMountain,162, 174, 200, true);
		SnakeRiver = new RiverCrossing("Snake River Crossing", FtBoise,114, 203,
				180);
		FtHall = new Location("Ft. Hall", SnakeRiver, 182, 257, 209, true);
		SodaSprings = new Location("Soda Springs", FtHall,57, 274, 217, false);
		FtBridger = new Location("Ft. Bridger", SodaSprings,162, 326, 229, true);
		SouthPass = new Location("South Pass", FtBridger, 125, 355, 199, false);
		IndependenceRock = new Location("Independence Rock", SouthPass,102,
				386, 206, false);
		FtLaramie = new Location("Ft. Laramie", IndependenceRock,190,  444,
				175, true);
		ChimeyRock = new Location("Chimey Rock", FtLaramie, 86, 472, 174, false);
		FtKearny = new Location("Ft. Kearny", ChimeyRock, 250, 539, 221, true);
		BigBlue = new RiverCrossing("Big Blue", FtKearny, 119, 575, 207);
		KansasRiver = new RiverCrossing("Kansas River", BigBlue, 83, 603, 216);
		Independence = new Location("Independence", KansasRiver, 102, 632,
				233, true);

	}
	
	public LinkedList<Location> getLocationList(){
		return locationList;
	}
}
